
  <template>
    <el-carousel :interval="2000"  type="card" height="400px" arrow="always">
      <el-carousel-item v-for="item in imgList" :key="item.id">
        <!--<h3>{{ item }}</h3>-->
        <img  style="object-fit: scale-down;width: 100%;height: 100%" :src="item.idView" class="image"
        />
      </el-carousel-item>
    </el-carousel>
  </template>

<script>
  export default{
    name: "slideshow",
    data(){
      return{

        imgList:[
          {id:0,idView:require("@/assets/2.png")},
          // {id:1,idView:require("@/assets/yh.jpg")},
          // {id:2,idView:require("@/assets/lyzl.jpg")},
          // {id:3,idView:require("@/assets/xs.jpg")},
          // {id:4,idView:require("@/assets/hk.jpg")},
        ],
        screenWidth:0
      };
    }

  }
</script>

<style>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>
